import { request } from "@/utils/request";

export default class Index {
    // 审批 列表
    static approvalStatus(query) {
        return request({
            url: "/adient-pms/pc/deviceRepairRecord/approvalStatus",
            method: "get",
            params: query,
        });
    }
    // 备件
    static approvalToolIoRecord(query) {
        return request({
            url: "/adient-pms/pc/toolIoRecord/page",
            method: "get",
            params: query,
        });
    }
    static approvalDeviceInspectionRecord(query) {
        return request({
            url: "/adient-pms/pc/deviceInspectionRecord/page1",
            method: "get",
            params: query,
        });
    }
    static approvalDeviceAccept(query) {
        return request({
            url: "/adient-pms/pc/deviceAccept/page",
            method: "get",
            params: query,
        });
    }
    // 备件审核
    static approvalCheckActNum(no) {
        return request({
            url: "/adient-pms/pc/toolIoRecord/checkIn/" + no,
            method: "get"
        });
    }
    // 备件领用审核
    static approvalConfirmClaim(query) {
        return request({
            url: "/adient-pms/pc/toolIoRecord/confirmClaim",
            method: "put",
            params: query
        });
    }
    // 备件归还审核
    static approvalConfirmReturn(query) {
        return request({
            url: "/adient-pms/pc/toolIoRecord/confirmReturn",
            method: "put",
            params: query
        });
    }

    // 审批
    static approval(query) {
        return request({
            url: "/adient-pms/pc/deviceRepairRecord/approval",
            method: "put",
            params: query,
        });
    }
    static cancelBatch(query) {
        return request({
            url: "/adient-pms/pc/deviceInspectionRecord/cancelBatch",
            method: "put",
            params: query,
        });
    }
    static chanegExamineBatch(query) {
        return request({
            url: "/adient-pms/pc/deviceInspectionRecord/chanegExamineBatch",
            method: "put",
            params: query,
        });
    }
    static chanegApprovalBatch(query) {
        return request({
            url: "/adient-pms/pc/deviceAccept/approvalBatch",
            method: "put",
            params: query,
        });
    }

    static cancelConfirmBatch(no) {
        return request({
            url: "/adient-pms/pc/deviceInspectionRecord/confirmBatch/" + no,
            method: "put"
        });
    }

    // 字典
    static dictDetails(query) {
        return request({
            url: `/admin-v3/dictDetail/page`,
            method: "get",
            params: query,
        });
    }
}
